Run py-fuzzer with --profile=profiling locally and in CI#21266
Merged
AlexWaygood merged 1 commit intomainfrom Nov 3, 2025
Merged
Run py-fuzzer with --profile=profiling locally and in CI#21266AlexWaygood merged 1 commit intomainfrom
--profile=profiling locally and in CI#21266AlexWaygood merged 1 commit intomainfrom
Conversation
247b923 to
59bcea9
Compare
Contributor
|
MichaReiser
approved these changes
Nov 3, 2025
AlexWaygood
commented
Nov 3, 2025
Comment on lines
+669
to
+679
| echo "new commit" | ||
| git rev-list --format=%s --max-count=1 "$GITHUB_SHA" | ||
| cargo build --profile=profiling --bin=ty | ||
| mv target/profiling/ty ty-new | ||
|
|
||
| MERGE_BASE="$(git merge-base "$GITHUB_SHA" "origin/$GITHUB_BASE_REF")" | ||
| git checkout -b old_commit "$MERGE_BASE" | ||
| echo "old commit (merge base)" | ||
| git rev-list --format=%s --max-count=1 old_commit | ||
| cargo build --profile=profiling --bin=ty | ||
| mv target/profiling/ty ty-old |
Member
Author
There was a problem hiding this comment.
this is all basically copied-and-pasted from
ruff/.github/workflows/typing_conformance.yaml
Lines 63 to 78 in 79a0271
and is also similar to what mypy_primer does.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Following #20962 we're seeing the fuzzer take much longer in CI on seed 742 than on any other seed (#20962 (comment)). But this problem is only reproducible in debug builds, so this doesn't seem like an issue that's worth worrying much about.
This PR switches the fuzzer CI job to use
--profile=profiling, and also makes this the new default if you run the fuzzer locally. This should mean that the build the fuzzer uses in CI has more similar performance characteristics to a release build. This in turn means we don't have to constantly wonder whether the fuzzer taking twice as long is indicative of a "real" issue or just an artifact of debug-build weirdness.As well this, this also reduces the amount of time the fuzzer CI job takes (4min30s -> 3min40s) and reduces the amount of time we need to wait for the fuzzer job to start. (Prior to this PR, you had to wait for the
cargo-test-linuxjob to finish before it would even start, because it reused the build uploaded from that job.)Test Plan
CI on this PR